home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3053 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: boy.nmd.msu.ru!not-for-mail
  2. From: krotoff@such.srcc.msu.su (Alexander Krotoff)
  3. Newsgroups: comp.lang.c++
  4. Subject: Operator Overloading question
  5. Date: 21 Jan 1996 17:38:29 +0300
  6. Organization: Research Computer Center, Moscow State University
  7. Sender: krotoff@boy.nmd.msu.ru
  8. Message-ID: <4dtj55$2nt@boy.nmd.msu.ru>
  9. References: <Robert.Lendvai-2101960120380001@129.170.80.94>
  10. Reply-To: krotoff@such.srcc.msu.su (Alexander Krotoff)
  11. NNTP-Posting-Host: boy.nmd.msu.ru
  12.  
  13. X-InCommentTo: Robert.Lendvai@dartmouth.edu (Robert Lendvai)
  14.  
  15. Robert.Lendvai@dartmouth.edu (Robert Lendvai) wrote:
  16. > Codewarrior is saying this:
  17. > Error   : illegal 'operator' declaration
  18. > player.h line 23   friend Boolean operator == (Player * member, char *
  19. > dude); //Check to see if a player has this name
  20. > about the following code, but I have no idea why. Can anyone help? 
  21.  
  22. > friend Boolean operator == (Player * member, char * dude); //Check to see
  23. > if a                                             //player has this name
  24.  
  25. As seems to me it is becouse at least one of the overloaded operator
  26. argumest must have the reference to class type or a class type.
  27. --
  28. Alexander
  29.